﻿@using Trauberman.SOChat.StarLeaderboard.Models
@using Trauberman.SOChat.StarLeaderboard.Domain
@model UserModel
@{
    ViewBag.Title = Model.UserName + "'s Starred Messages";
}
<h1>@Model.UserName's Messages:</h1>
<table>
    <tbody>
        @{int row = 0;}
        @foreach(StarredMessage message in Model.Messages.OrderByDescending(c=>c.StarCount))
        {
            <tr class='@(row++ % 2 == 0 ? "alternate" : null)'>
                <td><b>@message.StarCount</b></td>
                <td>@Html.Raw(message.MessageText)</td>
            </tr>   
        }
    </tbody>
</table>
<script type="text/javascript" src="@Url.Content("~/Scripts/CustomScripts/Room.js")"></script>